#pragma once
#include <vector>
#include <cstring>
#include <string>
#include "typedefs.h"

using namespace std;

class Symbol;


class SymbolTuple{
public:
	SymbolTuple(design_entity type, string name);
	
	design_entity getType();
	string getName();

	string toString();

private:
	design_entity type;
	string name;
};

class ResultClauseTuple {
public:
	ResultClauseTuple(symbolIndex symbol, attr_Name attribute);
	attr_Name getAttribute();
	symbolIndex getSymbolIndex();

	string toString();
private:
	symbolIndex symbol;
	attr_Name attribute;

};

class RelationTuple{
public:
	/*RelationTuple(relationType relRef, symbolIndex arg1, symbolIndex arg2);
	RelationTuple(relationType relRef, string argA, symbolIndex arg2);
	RelationTuple(relationType relRef, symbolIndex arg1, string argB);
	RelationTuple(relationType relRef, string argA, string argB);*/

	RelationTuple(relationType relRef);
	void setArg(int argument, int argumentNum);
	void setArg(symbolIndex argument, int argumentNum);
	void setArg(string argument, int argumentNum);
	
	string getNameArg(int argumentNum);
	int getNumberArg(int argumentNum);
	symbolIndex getSymbolArg(int argumentNum);

	relationType getrelRef();
	refType getRefType(int argumentNum);
	/*string getArgA();
	string getArgB();
	symbolIndex getArg1();
	symbolIndex getArg2();*/
	string toString();

private:
	relationType relRef;
	string nameArg1, nameArg2;
	symbolIndex symbolArg1, symbolArg2;
	int numberArg1, numberArg2;
	refType arg1Type, arg2Type;
};

class WithClauseTuple{
public:
	//WithClauseTuple(symbolIndex symbol, attr_Name attrName, string ref);
	WithClauseTuple(symbolIndex symbol, attr_Name attrName);
	void setRef(string nameRef);
	void setRef(int numberRef);
	symbolIndex getSymbol();
	attr_Name getAttrName();
	int getNumRef();
	string getNameRef();

	refType getRefType();
	string toString();

private:

	symbolIndex symbol;
	attr_Name attrName;
	string nameRef;
	int numberRef;
	refType referenceType;
	//string ref;
};

class PatternTuple{
public:
	PatternTuple(symbolIndex symbol, string entRef, string subExpression );

	symbolIndex getSymbol();
	string getEntRef();
	string getSubExpression();

private:
	symbolIndex symbol;
	string entRef;
	string subExpression;
};